<?php
namespace app\home\controller;
use app\home\model\AdModel;
use app\home\model\ArticleModel;
use app\home\model\CommentModel;
use think\Cookie;
use app\home\model\IndexModel;
use think\Db;

class Comment extends Base
{
    /**
     * insert [ 插入一条评论]
     * @author [Boot.Z] [852952656@qq.com]
     */
    public function insert()
    {
        if (request()->isAjax()){
            $param = input('param.');
            //dump(Cookie::get('id'));die;
            $CommentModel = New CommentModel();
            return $CommentModel -> insertOneComment($param);
        }else{
            $this->fetch('/404');
        }
    }



}
